home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
program
/
prtfrm51.zip
/
FRMSRC.ZIP
/
FDEMO02.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-06-21
|
4KB
|
140 lines
unit Fdemo02;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, Buttons, PrnWin, DBCtrls, Grids,
DBGrids, DB, DBTables, ExtCtrls, CB_Types;
type
TForm02 = class(TForm)
VPanel1: TBitBtn;
ScrollBox1: TScrollBox;
Exit: TBitBtn;
Panel1: TPanel;
Panel3: TPanel;
Panel2: TPanel;
VPanel2: TBitBtn;
VPanel3: TBitBtn;
VAll: TBitBtn;
Memo1: TMemo;
Edit1: TEdit;
Label1: TLabel;
RadioGroup1: TRadioGroup;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
Panel4: TPanel;
Memo2: TMemo;
Image1: TImage;
Shape1: TShape;
Label2: TLabel;
Button1: TButton;
DataSource1: TDataSource;
Table1: TTable;
DBGrid1: TDBGrid;
Label3: TLabel;
Panel5: TPanel;
DBImage1: TDBImage;
PrintWin1: TPrintWin;
AllSame: TBitBtn;
Table1NAME: TStringField;
Table1SIZE: TSmallintField;
Table1WEIGHT: TSmallintField;
Table1AREA: TStringField;
Table1BMP: TBlobField;
BitBtn1: TBitBtn;
procedure VPanel1Click(Sender: TObject);
procedure VPanel2Click(Sender: TObject);
procedure VPanel3Click(Sender: TObject);
procedure VAllClick(Sender: TObject);
procedure AllSameClick(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure ExitClick(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form02: TForm02;
implementation
{$R *.DFM}
procedure TForm02.VPanel1Click(Sender: TObject);
begin
PrintWin1.HeaderStringCenter := 'Printing of Panel1';
PrintWin1.BeginPrint;
PrintWin1.DrawWindow(2,poCenter,Panel1);
PrintWin1.EndPrint;
end;
procedure TForm02.VPanel2Click(Sender: TObject);
begin
PrintWin1.HeaderStringCenter := 'Printing of Panel2';
PrintWin1.BeginPrint;
PrintWin1.DrawWindow(2,poCenter,Panel2);
PrintWin1.EndPrint;
end;
procedure TForm02.VPanel3Click(Sender: TObject);
begin
PrintWin1.HeaderStringCenter := 'Printing of Panel3';
PrintWin1.BeginPrint;
PrintWin1.DrawWindow(2,poCenter,Panel3);
PrintWin1.EndPrint;
end;
procedure TForm02.VAllClick(Sender: TObject);
begin
PrintWin1.HeaderStringCenter := 'All Panels on separate Pages';
PrintWin1.BeginPrint;
PrintWin1.DrawWindow(2,poCenter,Panel1);
PrintWin1.NewPage;
PrintWin1.DrawWindow(2,poCenter,Panel2);
PrintWin1.NewPage;
PrintWin1.DrawWindow(2,poCenter,Panel3);
PrintWin1.EndPrint;
end;
procedure TForm02.AllSameClick(Sender: TObject);
begin
PrintWin1.HeaderStringCenter := 'All Panels on same Page - Portrait';
PrintWin1.Orientation := Portrait;
PrintWin1.BeginPrint;
PrintWin1.DrawWindow(1,poCenter,Panel1);
PrintWin1.DrawWindow(4,poCenter,Panel2);
PrintWin1.DrawWindow(6.5,poCenter,Panel3);
PrintWin1.EndPrint;
end;
procedure TForm02.BitBtn1Click(Sender: TObject);
begin
PrintWin1.HeaderStringCenter := 'All Panels on same Page - Landscape';
PrintWin1.Orientation := Landscape;
PrintWin1.BeginPrint;
PrintWin1.DrawWindowAt(1,1,Panel1);
PrintWin1.DrawWindowAt(5.5,1,Panel2);
PrintWin1.DrawWindow(4.5,poCenter,Panel3);
PrintWin1.EndPrint;
end;
procedure TForm02.ExitClick(Sender: TObject);
begin
Close;
end;
procedure TForm02.Button1Click(Sender: TObject);
begin
MessageBeep(MB_ICONEXCLAMATION);
MessageDlg('This is to show that buttons can be included', mtInformation,
[mbOk], 0);
end;
end.